{% extends "base_employer.html" %} 

{% block content %}
<div class="container mt-5">
  <h2 class="text-center mb-4">Настройки профиля работодателя</h2>
  <div class="row">
    <div class="col-md-3">
      <div class="list-group" id="settingsTab" role="tablist">
        <a class="list-group-item list-group-item-action active" id="avatar-tab" data-bs-toggle="list" href="#avatar" role="tab" aria-controls="avatar">
          <i class="bi bi-person-circle"></i> Аватар
        </a>
        <a class="list-group-item list-group-item-action" id="email-tab" data-bs-toggle="list" href="#email" role="tab" aria-controls="email">
          <i class="bi bi-envelope"></i> Электронная почта
        </a>
        <a class="list-group-item list-group-item-action" id="password-tab" data-bs-toggle="list" href="#password" role="tab" aria-controls="password">
          <i class="bi bi-lock"></i> Пароль
        </a>
      </div>
    </div>
    <div class="col-md-6">
      <div class="tab-content" id="settingsTabContent">
        <div class="tab-pane fade show active" id="avatar" role="tabpanel" aria-labelledby="avatar-tab">
          <form method="POST" enctype="multipart/form-data">
            {{ avatar_form.hidden_tag() }}
            <div class="mb-3">
              <label for="avatar" class="form-label">Аватар:</label>
              {{ avatar_form.avatar(class="form-control") }}
            </div>
            <button type="submit" class="btn btn-primary">Обновить</button>
          </form>
        </div>
        <div class="tab-pane fade" id="email" role="tabpanel" aria-labelledby="email-tab">
          <form method="POST">
            {{ email_form.hidden_tag() }}
            <div class="mb-3">
              <label for="email" class="form-label">Электронная почта:</label>
              {{ email_form.email(class="form-control") }}
            </div>
            <button type="submit" class="btn btn-primary">Обновить</button>
          </form>
        </div>
        <div class="tab-pane fade" id="password" role="tabpanel" aria-labelledby="password-tab">
          <form method="POST">
            {{ password_form.hidden_tag() }}
            <div class="mb-3">
              <label for="current_password" class="form-label">Текущий пароль:</label>
              {{ password_form.current_password(class="form-control") }}
            </div>
            <div class="mb-3">
              <label for="new_password" class="form-label">Новый пароль:</label>
              {{ password_form.new_password(class="form-control") }}
            </div>
            <div class="mb-3">
              <label for="confirm_new_password" class="form-label">Подтвердите новый пароль:</label>
              {{ password_form.confirm_new_password(class="form-control") }}
            </div>
            <button type="submit" class="btn btn-primary">Обновить</button>
          </form>
        </div>
      </div>
    </div>
  </div>
</div>
{% endblock %}
